package com.huitone.gddw.service.impl.system;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.huitone.gddw.dao.entity.Menu;
import com.huitone.gddw.dao.system.IMenuDao;
import com.huitone.gddw.service.system.IMenuService;

/**
 * 菜单管理 接口实现类
 * @author wuluodan
 *
 */
@Service
public class MenuService implements IMenuService {

	@Autowired
	private IMenuDao menuDao;
	
	@Override
	public List<Menu> getAll() {
		return menuDao.getAll();
	}

	@Override
	public List<Menu> getMenusByRole(String roleId) {
		return menuDao.getMenuByRoleId(roleId);
	}

	@Override
	public List<Menu> getByIds(List<String> ids) {
		if (null == ids || 0 == ids.size()) {
			return null;
		}
		return menuDao.getByIds(ids);
	}

}
